var record_index = 0;
var int          = null;
function auto_slideshow_news(){
	var news_lastest = $.makeArray($('#slide-navigation li'));
	if(record_index > news_lastest.length - 1){
		record_index = 0;
		}
		clear();
		var title = $(news_lastest[record_index]).find('h3').text();
		var url   = $(news_lastest[record_index]).find('.thumb_lastnews').val();
                var link  = $(news_lastest[record_index]).find('a').attr('href');
                
		$('#slide img').attr('src',url);
                $('#slide a').text(title);
                $('#slide a').attr('href',link);
                $('#slide a').attr('title',title);
		change_opacity_show(news_lastest[record_index]);
		record_index++;
		int = setTimeout(function(){
		auto_slideshow_news();
		},4000);
	}

function load_slideshow_news(){
	var news_lastest	=	$.makeArray($('#slide-navigation li'));
	clear();
	var title	=	$(news_lastest[0]).find('h3').text();
	record_index	=	0;
	var url	=	$(news_lastest[0]).find('.thumb_lastnews').val();
        var link        = $(news_lastest[0]).find('a').attr('href');
	$('#slide img').attr('src', url);
        $('#slide a').text(title);
	$('#slide a').attr('href',link);
        $('#slide a').attr('title',title);
	change_opacity_show(news_lastest[0]);
}
function clear(){
	var news_lastest = $('#slide-navigation li');
	$.each(news_lastest,function(index,el){
		change_opacity_hidden(el);
		});
	}
function change_opacity_hidden(el){
		if($.browser.msie){
			$(el).css('filter','alpha(opacity = 25)');
			}else{
				$(el).css('opacity','0.4');}
	}
function change_opacity_show(el){
		if($.browser.msie){
			$(el).css('filter','alpha(opacity = 100)');
			}else{
				$(el).css('opacity','1');}
}


var notice_record_index =   0;
var int_notice      =   null;
function auto_slideshow_notice(){
	var news_lastest = $.makeArray($('.lastest-notice li'));
        if(news_lastest.length <= 1){
            return;
        }
	if(notice_record_index > news_lastest.length - 1){
            notice_record_index = 0;
	}
        $('.lastest-notice li').hide();
        $(news_lastest[notice_record_index]).fadeIn(800);
	notice_record_index++;
        int_notice = setTimeout(function(){
	auto_slideshow_notice();
    },10000);
}